#include <algorithm>
#include <iostream>
#include<cstdio>
#include<string.h>
using namespace std;
const int p = 998244353;

long long s,n,l,r,mid;
int main() {
    scanf("%lld",&n);
    l=1;r=1;
    while(l+r<=n){
        mid=l;
        l=r;
        r=mid+r;
    }
    if(n==2) r=1;
    printf("%lld %lld\n",l,r);
    return 0;
}